Collect user interactions as events on your media website.
clickAnalytics
parameter to true
when making search requests.
This includes the queryID
parameter in the search response,
which is required for linking events and search requests.
search-insights
library.
search-insights
library, initialize the client in your website.
User action | Method name |
---|---|
User clicks search result | clickedObjectIDsAfterSearch |
User adds product to shopping cart | addedToCartObjectIDsAfterSearch |
User clicks categories/filters | clickedFilters |
User views search results | viewedObjectIDs |
User action | Method name |
---|---|
User clicks content | clickedObjectIDsAfterSearch |
User views content | viewedObjectIDs |
User action | Method name |
---|---|
User views content | viewedObjectIDs |
clickedObjectIdsAfterSearch
:
queryID
is used by Algolia to relate the event to a prior search or browse event.objectIDs
should contain the ID of the article. This can be retrieved from the objectID
field of the hits
array returned from the search request.positions
indicates the position of the item in the search results. For example, if the user clicked on the top result on the page, positions should be [1]
.window.aa
object is the API client for the Insights API and is globally available
if you enabled automatic events collection.
In convertedObjectIDsAfterSearch
:
queryID
is used by Algolia to relate the event to a prior search.objectIDs
indicates which items were part of the conversion.The objectID
parameter is included in the search response for each hit.convertedObjectIDs
method instead.
Article Bookmarked
: a user bookmarked an article.Article Liked
: a user liked an article.Article Recommended
: a user recommended an article.Playlist Followed
: a user followed a playlist.Author Followed
: a user followed an author.Brand Followed
: a user followed a brand.authenticatedUserToken
parameter.
authenticatedUserToken
parameter in the Insights client, you also need to update
the user token you send with your search requests.